package com.example.hospitalManage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.hospitalManage.entity.UserInfo;
import com.example.hospitalManage.dao.UserInfoMapper;
import com.example.hospitalManage.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: yygh
 * @Author: gxy
 * @Time: 2022/12/21 16:02
 * @Description: 描述
 */
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {
    @Autowired
    UserInfoMapper userInfoMapper;

    /**
     * @param :
     * @return List<UserInfo>
     * @author GCT
     * @description TODO
     * @date 2023/1/2 21:57
     */
    @Override
    public List<UserInfo> findUsers() {
        return userInfoMapper.findUsers();
    }

    /**
     * @param username:
     * @return UserInfo
     * @author GCT
     * @description TODO
     * @date 2023/1/2 21:57
     */
    @Override
    public UserInfo findUserByUserName(String username) {
        return userInfoMapper.findUserByUserName(username);
    }

    /**
     * @param username:
     * @return List<String>
     * @author GCT
     * @description TODO
     * 获取权限信息
     * @date 2023/1/2 21:57
     */
    @Override
    public List<String> getPermissions(String username) {
        return userInfoMapper.getPermissions(username);
    }

}
